package com.pandas.community.dao;


import com.pandas.community.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * Created by Liu Jiangang Cotter on 2021/3/21.
 */
@Mapper
@Repository
public interface UserMapper {
    //根据id查询User
    User selectById(int id);
    //根据name查询User
    User selectByName(String username);
    //根据email查询User
    User selectByEmail(String email);
    //往数据库插入User
    int insertUser(User user);
    //根据id更新User状态 0-未激活 1-已激活
    int updateStatus(int id, int status);
    //根据id更新头像图片
    int updateHeader(int id, String headerUrl);
    //根据id更新密码
    int updatePassword(int id, String password);

}
